import { Request, Response } from 'express';

const orderList = (req: Request, res: Response) => {
  res.json({
    "data": [
      {
        "id": 2,
        "oeder_manage": "李四",
        "o_id": "456",
        "status": "1",
        "name": "王芳",
        "sex": "2",
        "phone": '654321',
        "mobile_phone": "19876543210",
        "WhatsApp": "456",
        "email": "456@.com",
        "country": "法国",
        "city": "巴黎",
        "state": "普罗旺斯",
        "postal_code": "654321",
        "company": "蓝海科技",
        "receive_address": "江苏省xxxx",
        "bank": "建设银行",
        "banke_code": "456",
        "sku": "sku-2",
        "kwp": "2000",
        "pcs": "2233",
        "pallet": "222",
        "rate": "99%",
        "coupon": "200",
        "rep_status": "0",
        "warehouse": "某某仓库2",
        "logistics_company": "圆通快递",
        "pay_method": "微信支付",
        "Logistics_url": "",
        "cmrFileUrl": "https://example.com/image2.png"
      },
      {
        "id": 3,
        "oeder_manage": "王五",
        "o_id": "789",
        "status": "0",
        "name": "赵六",
        "sex": "1",
        "phone": "987654",
        "mobile_phone": "12398765432",
        "WhatsApp": "789",
        "email": "789@.com",
        "country": "美国",
        "city": "纽约",
        "state": "纽约州",
        "postal_code": "987654",
        "company": "未来科技",
        "receive_address": "广东省xxxx",
        "bank": "农业银行",
        "banke_code": "789",
        "sku": "sku-3",
        "kwp": "1500",
        "pcs": "3344",
        "pallet": "333",
        "rate": "95%",
        "coupon": "150",
        "rep_status": "1",
        "warehouse": "某某仓库3",
        "logistics_company": "中通快递",
        "pay_method": "支付宝",
        "Logistics_url": "",
        "cmrFileUrl": "https://example.com/image3.png"
      }
    ],
    "errCode": 0,
    "errMsg": null,
    "extend": null,
    "redirectUrl": null,
    "success": true,
    "total": 3
  })
}

const successRequest = (req: Request, res: Response) => {
  res.json({
    "success": true,
    "errCode": 0,
    "errMsg": null,
    "total": 0,
    "redirectUrl": null,
    "extend": null
  });
}

export default {
  'GET /api/order/list': orderList,
  'POST /api/order/add': successRequest,
}
